unit Feriado;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, DB, DBTables, Grids, DBGrids, StdCtrls, Buttons, ActnList,
  ImgList, ComCtrls;

type
  TFormFeriado = class(TForm)
    DataSource1: TDataSource;
    DBGrid1: TDBGrid;
    QueryFeriado: TQuery;
    ListView2: TListView;
    ImageList2: TImageList;
    ActTotal: TActionList;
    ActionVoltar: TAction;
    procedure FormKeyDown(Sender: TObject; var Key: Word;
      Shift: TShiftState);
    procedure ListView2Click(Sender: TObject);
    procedure ActionVoltarExecute(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FormFeriado: TFormFeriado;

implementation

{$R *.dfm}

procedure TFormFeriado.FormKeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
if Key = 27 then
   self.Close;

end;

procedure TFormFeriado.ListView2Click(Sender: TObject);
var List: TListView;
begin
if TListView(Sender).Selected <> nil then
  begin
        List := TlistView(Sender);
        ActTotal.Actions[List.Selected.StateIndex].Execute;
  end;

end;

procedure TFormFeriado.ActionVoltarExecute(Sender: TObject);
begin
self.close;
end;

end.
